package com.example.baidumapdemo.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

import com.example.baidumapdemo.R;

public class ChooseLocationActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_choose_location);
        TextView textView = findViewById(R.id.textView);
        textView.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.textView:
                Intent intent = new Intent();
                intent.putExtra("latitude", "33.639091");
                intent.putExtra("longitude", "116.950025");
                setResult(RESULT_OK, intent);
                finish();
                break;
            default:
                break;
        }
    }
}